package us.sunrisemorning.bilibili_live_chat;

public class Constants {
    public static final String API_GETDANMUINFO_URL = "https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo";

    public static final long HEARTBEAT_SLEEP_TIME = 30000;

    public static final String CMD_DANMU_MSG = "DANMU_MSG";

    public static final int WS_OP_HEARTBEAT = 2; //心跳
    public static final int WS_OP_HEARTBEAT_REPLY = 3; //心跳回应
    public static final int WS_OP_MESSAGE = 5; //弹幕;消息等
    public static final int WS_OP_USER_AUTHENTICATION = 7;//用户进入房间
    public static final int WS_OP_CONNECT_SUCCESS = 8; //进房回应
    public static final short WS_PACKAGE_HEADER_TOTAL_LENGTH = 16;//头部字节大小
    public static final int WS_PACKAGE_OFFSET = 0;
    public static final int WS_HEADER_OFFSET = 4;
    public static final int WS_VERSION_OFFSET = 6;
    public static final int WS_OPERATION_OFFSET = 8;
    public static final int WS_SEQUENCE_OFFSET = 12;
    public static final short WS_BODY_PROTOCOL_VERSION_NORMAL = 0;//普通消息
    public static final short WS_BODY_PROTOCOL_VERSION_ZLIB = 2;//zlib压缩信息
    public static final short WS_BODY_PROTOCOL_VERSION_BROTLI = 3;//brotli压缩信息
    public static final short WS_HEADER_DEFAULT_VERSION = 1;
    public static final int WS_HEADER_DEFAULT_OPERATION = 1;
    public static final short WS_HEADER_DEFAULT_SEQUENCE = 1;
    public static final int WS_AUTH_OK = 0;
    public static final int WS_AUTH_TOKEN_ERROR = -101;

    private Constants() {
    }
}
